<script setup lang="ts">
import Son from './components/Son.vue'
import { ref } from 'vue'

const money = ref(100)
const car = ref('奔驰')

const payMoney = (value: number) => {
  money.value -= value
}
const getMoney = (value: number) => {
  money.value += value
}
</script>

<template>
  <div>app组件</div>
  <hr />
  <Son
    :money="money"
    :car="car"
    @pay-money="payMoney"
    @get-money="getMoney"
  ></Son>
  <br />
  <!-- <Son :money="money"></Son> -->
</template>

<style></style>
